package com.lagou.tdcqfdmeo.start;

import com.lagou.rpcdemo.request.RpcRequest;
import com.lagou.rpcdemo.service.UserService;
import com.lagou.tdcqfdmeo.consume.RpcConsumer;

/**
 * @author srh
 * @date 2020/10/18
 **/
public class ClientBootStrap {

    public static void main(String[] args) throws InterruptedException {
        UserService proxyService = (UserService) RpcConsumer.createProxy(UserService.class, new RpcRequest());

        for (int i = 0; i < 5; i++) {
            Thread.sleep(3000);

            String result = proxyService.sayHello(String.valueOf(i));
            System.out.println("client accept message=" + result);
        }
    }

}
